package server;

/**
 * This entity class represents connection properties, which are used for
 * connecting in databases.
 * 
 * @author Ingo Philipp

 * @version $Revision: 1.0 $
 */
public class DBProperties {
	
    private final DBTypes dbType;
    private final String dbName;
    private final Integer port;
    private final String userName;
    private final String password;
    private final String host;

    /**
     * Constructor for DBProperties.
     * @param type DBTypes
     * @param dbName String
     * @param port Integer
     * @param userName String
     * @param password String
     * @param host String
     */
    public DBProperties(DBTypes type, String dbName, Integer port,
	    String userName, String password, String host) {
	this.dbType = type;
	this.dbName = dbName;
	this.port = port;
	this.userName = userName;
	this.password = password;
	this.host = host;
    }


    /**
     * Method getHost.
     * @return String
     */
    String getHost() {
	return host;
    }

    /**
     * Method getDbType.
     * @return DBTypes
     */
    DBTypes getDbType() {
	return dbType;
    }

    /**
     * Method getDbName.
     * @return String
     */
    String getDbName() {
	return dbName;
    }

    /**
     * Method getPort.
     * @return int
     */
    int getPort() {
	return port;
    }

    /**
     * Method getUserName.
     * @return String
     */
    String getUserName() {
	return userName;
    }

    /**
     * Method getPassword.
     * @return String
     */
    String getPassword() {
	return password;
    }


    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	return "DBProperties [dbType=" + dbType + ", dbName=" + dbName
		+ ", port=" + port + ", userName=" + userName + ", password="
		+ password + ", host=" + host + "]";
    }

}
